b6e708dc547f477b6ad69c7aab6c8901ecafbf8b,source/org/jasig/portal/utils/XSLT.java,XSLT,transform,#String#URL#DocumentHandler#Hashtable#String#String#,229
Before Change
* @deprecated replaced by {@link #transform(String, URL, DocumentHandler, Hashtable, String, BrowserInfo)}
*/
public static void transform (String xml, URL sslUri, DocumentHandler out, Hashtable stylesheetParams, String stylesheetTitle, String media) throws SAXException, IOException, PortalException {
XSLTInputSource xmlSource = new XSLTInputSource(new StringReader(xml));
XSLTResultTarget xmlResult = new XSLTResultTarget(out);
StylesheetSet set = getStylesheetSet(sslUri.toExternalForm());
set.setMediaProps(mediaProps);
XSLTProcessor processor = XSLTProcessorFactory.getProcessor();
StylesheetRoot stylesheetRoot = getStylesheetRoot(set.getStylesheetURI(stylesheetTitle, media));
processor.reset();
setStylesheetParams(processor, stylesheetParams);
stylesheetRoot.process(processor, xmlSource, xmlResult);
}
/**
After Change
try {
StylesheetSet set = getStylesheetSet(sslUri.toExternalForm());
set.setMediaProps(mediaProps);
transform(new StreamSource(new StringReader(xml)), new SAXResult(out), stylesheetParams, set.getStylesheetURI(stylesheetTitle, media));
} catch (Exception e) {
throw new GeneralRenderingException(e.getMessage());
}